﻿using System.Xml;
using System.Xml.Serialization;
using System;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Xml.Schema;

namespace ScormModel
{
    [Serializable()]
    public class RuleAction
    {
        private string _action;
        [NonSerialized]
        private XmlNode _ruleActionContent;
        [XmlAttribute("action")]
        public string Action
        {
            get { return this._action; }
            set { this._action = value; }
        }
        [XmlIgnoreAttribute]
        public XmlNode RuleActionContent
        {
            get { return this._ruleActionContent; }
            set { this._ruleActionContent = value; }
        }
        public void buildRuleAction()
        {
            XmlAttributeCollection attList = _ruleActionContent.Attributes;

            for (int i = 0; i < attList.Count; i++)
            {
                if (attList[i].Name == "action")
                {
                    _action = attList[i].Value;
                }
            }
        }
    }
}
